#
# StationsSourceViewItem.py
#
# This work is released under the GNU GPL, version 2 or later.
#

from SourceViewItem import *
from DB.RadioLibrary import *

#
# "Podcasts" (streaming)
#
class StationsSourceViewItem(SourceViewItem):
	def __init__(self,container):
		SourceViewItem.__init__(self,container,i18n("Podcasts"))
		self.setFont(11,True)

	def makeKey(self):
		return 'A'

	def iconFileName(self): return "sourceradio.png"
	
	def select(self,container):
		container.emit(PYSIGNAL('selectRadio'),(None,None))

##~ 	def buildPopup(self,mainWindow):
##~ 		self.popup = QPopupMenu()
##~ 		id = self.popup.insertItem(i18n("Add Station..."),self.addStation)
##~ 		id = self.popup.insertItem(i18n("Refresh Station List"),self.refresh)
		
	def addStation(self):
		RadioLibrary.singleton().addStream()

	def refresh(self):
		mainWindow.slotRefresh()

